package com.zm.controller;

import com.alibaba.fastjson.JSON;
import com.zm.pojo.DataDictionary;
import com.zm.service.DataDictionaryService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2018/9/15.
 */
@Controller
@RequestMapping("/data")
public class DataDictionaryController {
    @Resource
    private DataDictionaryService dictionaryService;

    /**
     * 通过ajax查询app状态和所属平台
     * @param typecode
     */
    @RequestMapping("/selectSatus")
    @ResponseBody
    public Object selectSataus(String typecode){
        List<DataDictionary> list=dictionaryService.seleletByStatus(typecode);
        Object object= JSON.toJSONString(list);
        return object;

    }
}
